package co.yixiang.modules.shop.web.controller;

import co.yixiang.annotation.AnonymousAccess;
import co.yixiang.common.api.ApiResult;
import co.yixiang.common.web.controller.BaseController;
import co.yixiang.modules.shop.entity.YxInfo;
import co.yixiang.modules.shop.service.YxInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 走进海铂 前端控制器
 * </p>
 *
 * @author hisen
 * @since 2019-10-02
 */
@Slf4j
@RestController
@RequestMapping("/info")
@Api(value = "品牌指引模块", tags = "投资端:品牌指引模块", description = "品牌指引模块")
public class InfoController extends BaseController {

    @Autowired
    private YxInfoService yxInfoService;


    /**
     * 资讯列表
     */
    @AnonymousAccess
    @GetMapping("/detail")
    @ApiOperation(value = "资讯详细信息",notes = "资讯详细信息",response = YxInfo.class)

    public ApiResult<YxInfo> getYxInfoDetail(int id){
         return ApiResult.ok(yxInfoService.getYxInfoDetail(id));
    }

}

